<include file="Public:header" />
<script type="text/javascript">
	$(
		function(){
			doChange();
			
			$("#type").change(
				function(){
					
					doChange();
				}
			
			);
		}
	);
	function doChange(){
		//根据选择的内容模型加载分类
		
		var typeval =  $("#type").val();
		$.get(
			"__APP__/Cat/getCats/type/"+typeval,
			function(data){
				$('#cathtml').html(data);
			}
		);
		
	}
</script>
<script type="text/javascript" src="__PUBLIC__/js/iColorPicker.js"></script>
<div class="main" >
	<div id="navigation"> &nbsp;当前位置 > 内容管理 > 添加内容</div>
	<div class="mainmenu"><a href="__URL__/contentList"> < 返 回</a></div>
	<form id="contentForm" action="__URL__/nextContent" method="post" enctype="multipart/form-data">
	<table id="mainform">
		<tr>
			<th width="80">参数说明</th><th>参数值</th>
		</tr>
		<tr>
			<td>内容模型: </td>
			<td>
				<select name="type" id="type">
					<volist name="models" id="vo">
						<?php if($vo['tablename']!='Spage'){echo '<option value="'.$vo['tablename'].'">'.$vo['name'].'</option>';}?>	
					</volist>
				</select>
			</td>
		</tr>
		<tr>
			<td>栏   目: </td>
			<td id="cathtml">
				<select name="cat" id="cat">
					<option value="0">请先选择内容模型</option>
				</select>
			</td>
		</tr>
		<tr>
			<td>标   题: </td>
			<td>
				<input type="text" id="title" name="title" value="" />
				<br/>
				标题样式：粗体 <input type="checkbox" id="isStrong" name="isStrong" value="strong"/>&nbsp; 
				斜体   <input type="checkbox" id="isi" name="isi" value="i"/>&nbsp; 
				删除线 <input type="checkbox" id="iss" name="iss" value="s"/>&nbsp; 
				颜色： <input type="text" id="fontColor" name="fontColor" value="" style="width:80px;" class="iColorPicker"/>
			</td>
		</tr>
		<tr>
			<td>点击数: </td><td><input type="text" id="num" name="num" value="0" />填0系统将按照内容模型设置随机取值</td>
		</tr>
		<tr>
			<td>标   志: </td>
			<td>
				<div class="radio">
					<input type="checkbox" id="istop" name="istop" value="1"/><label for="istop">置顶</label>
					<input type="checkbox" id="isrecom" name="isrecom" value="1"/><label for="isrecom">推荐</label>
					<input type="checkbox" id="isimg" name="isimg" value="1"/><label for="isimg">图片</label>
				</div>
			</td>
		</tr>
		<tr>
			<td>缩略图: </td><td><input type="file" id="img" name="img" value="" /></td>
		</tr>
		<tr>
			<td>关键字: </td><td><input type="text" id="keyword" name="keyword" value="" /></td>
		</tr>
		<tr>
			<td>描     述: </td><td><textarea name="info" id="info" rows="3" cols="50"></textarea></td>
		</tr>
  </table>
  <div class="mainmenu"><input type="submit" id="subutton" value="下一步 >"/>&nbsp;&nbsp;<input type="reset" value="重 置"/></div>
  </form>
</div>
 